home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / SHUTTL.ARJ / GR_UNT.PAS next >
Pascal/Delphi Source File  |  1991-03-26  |  766b  |  33 lines

  1. unit gr_unt;
  2. interface
  3.   uses Graph,drivers,fonts;
  4.   procedure gr_setup;
  5. implementation
  6. var
  7.   Gd, Gm : integer;
  8.   Radius : integer;
  9. procedure Abort(Msg : string);
  10. begin
  11.   Writeln(Msg, ': ', GraphErrorMsg(GraphResult));
  12.   Halt(1);
  13. end;
  14. procedure gr_setup;
  15. begin
  16.   { Register all the drivers }
  17.   if RegisterBGIdriver(@CGADriverProc) < 0 then
  18.     Abort('CGA');
  19.   if RegisterBGIdriver(@EGAVGADriverProc) < 0 then
  20.     Abort('EGA/VGA');
  21.   if RegisterBGIdriver(@HercDriverProc) < 0 then
  22.     Abort('Herc');
  23.   if RegisterBGIdriver(@ATTDriverProc) < 0 then
  24.     Abort('AT&T');
  25.   if RegisterBGIdriver(@PC3270DriverProc) < 0 then
  26.     Abort('PC 3270');
  27.   Gd := Detect;
  28.   InitGraph(Gd, Gm, '');
  29.   if GraphResult <> grOk then
  30.     Halt(1);
  31. end;
  32. end.
  33.